package br.com.alinesoftware.app.controller.rest;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;

import org.jboss.resteasy.annotations.cache.NoCache;

import br.com.alinesoftware.app.entity.Cliente;
import br.com.alinesoftware.app.entity.ClienteEntity;

@Path("/plc/controlador")
public class ClienteRest {

	@POST
	@Path("/rest/clienterest")
	@Produces("text/plain; charset=ISO-8859-1")
	@NoCache
	public String recuperaSelecao(@Context HttpServletRequest request, @Context HttpServletResponse response) {

		// PlcFacadeImpl facade = (PlcFacadeImpl)
		// PlcCDIUtil.getInstance().getInstanceByType(PlcFacadeImpl.class,
		// QPlcDefaultLiteral.INSTANCE );
		StringBuilder retorno = new StringBuilder();

		Cliente obj = new ClienteEntity();
		System.out.println(obj.toString());
		// String ret[] = null;//recuperaMensagemParaUsuario(request);
		retorno.append("{id:Fui no Servidor e voltei com o Objeto" + obj.toString() + "}");
		return retorno.toString();
	}

}
